<%@page import="net.vinote.smart.platform.service.bean.CodeLibrary"%>
<%@page import="java.util.Iterator"%>
<%@page import="net.vinote.smart.platform.comm.PlatformConst"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<!--以树图形式展现应用科目 -->
<%String treeID="AppInfoSubject"; %>
<%@include file="/comm/tree_begin.jsp"%>
<%
	tree = treeUI.getTreeByCode(treeID);
	tree.setLines(true);
%>
<div style="padding: 1px 0px;"></div>
<ul id="<%=tree.getId()%>"></ul>
<script>
	$(function() {
		<%=tree.getHtml()%>
		$('#<%=treeID%>').tree(
				{
					onSelect : function(node) {
						var subject = node.id;
						//alert(subject);
						//DWControl.OpenDwComp("system.app_info_list.jsp","subject="+subject, parent.center);
						AWE.OpenDwLayout('#AppInfoFrame_layout','center','system.app_info_list.jsp',"subject="+subject);
					}
				});
		<%
		//默认选中第一个节点
		Iterator<CodeLibrary> codeIterator=SRE.getCodeItems("AppInfoSubject").values().iterator();
		String selected=null;
		if(codeIterator.hasNext()){
			selected=codeIterator.next().getItemNo();
			%>
			$('#<%=treeID%>').tree('select', $('#<%=treeID%>').tree('find', '<%=selected%>').target);
			<%
		}
		%>
});
//-->
</script>
<%@include file="/comm/end.jsp"%>
